<template>
  <view>
    location
  </view>
</template>

<script>
  export default {
    data() {
      return {

      };
    },
    onLoad() {
      console.log('----------------------')
      uni.getLocation({
        type: 'gcj02',
        success: function(res) {
          console.log('当前位置的经度：' + res.longitude);
          console.log('当前位置的纬度：' + res.latitude);
        },
        fail: function(res) {
          console.log("失败", res)
        }
      });
    }
  }
</script>

<style lang="scss">

</style>